import { createApp } from "vue";

import { setupAntd } from "@/libs/antdv"; // 组件管理
import { setupAntdIcon } from "@/libs/antdvIcons"; // 图标库
import router, { setupRouter } from "@/router"; // 路由
import Store, { setupStore } from "@/store"; // 状态管理
import $axios from "@/utils/request"; //axios封装
import SvgIcon from "@/components/SvgIcon/index.vue";
import VueCookies from 'vue-cookies' //原cookies
import CooieTool from '@/utils/cookie' //CooieTool封装\
import Dayjs from 'dayjs' //dayjs日期管理
import AntdIcon from '@/components/icon/index.vue'
import RouterIcon from '@/components/routerIcon/index.vue'
import App from "./App.vue";

const app = createApp(App);
setupRouter(app); // 引入路由
setupAntd(app); // 引入组件库
setupAntdIcon(app); // 引入图标库
setupStore(app); // 引入状态管理
// app.use(router);
app.component("SvgIcon", SvgIcon);
app.component("AntdIcon", AntdIcon);
app.component("RouterIcon", RouterIcon);
app.config.globalProperties.$dayjs = Dayjs
app.config.globalProperties.$request = $axios;
app.config.globalProperties.$store = Store;
app.config.globalProperties.$cookies = VueCookies;
app.config.globalProperties.$CooieTool = CooieTool
// app.mount("#app");
router.isReady().then(() => {
	app.mount("#app");
});
